#pragma once
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <list>
#include <utility>

#define BLOCKED false
#define FREE true

enum Direction {UP = 1, RIGHT = 2, DOWN = 4, LEFT = 8};			//rwx logic
enum Color {GREY, WHITE, BLACK};
enum Condition {NOT, HALF, READY};

using namespace std;

class Cell
{
	struct orientation
	{
		bool *left,
			*right,
			*up,
			*down;
		int num_blocked;
	} direction;
	

	struct  
	{
		int x, y;
	} pos;
	
	Condition condition;
	static const int N = 7;
	
public:
	Cell(int xxx, int yyy);
	Cell();
	
	~Cell(void);
	pair<int, int> getPos();
	void setPos(int x, int y);
	friend ostream& operator <<(ostream &, Cell p);
	friend ostream& operator <<(ostream &, Cell *p);
	void copyDirection(Direction, bool *);
	void setDirectionToBlocked(int);
	orientation getDirection();
	int checkDirectionSwitch(Color);
	friend class StateManager;
	void setCondition(Condition);
};


